﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media;

namespace personalplaner.business.dienstplan.plancollection
{
	public class AbteilungRow : ListBase<PlanItem>, IDienstPlanRow
    {
        public void Initialize(DateTime beginDate, IList<PlanItem> items = null)
        {
            int cnt = DateTime.DaysInMonth(beginDate.Year, beginDate.Month);
            for (int i = 0; i < cnt; i++)
                Add(new PlanItem
                {
                    Datum = new DateTime(beginDate.Year, beginDate.Month, i + 1),
                    Color = RowColor,
					CanExecuteCommand = false
                });
        }

        int _abteilungid;
        public int AbteilungId
        {
            get
            {
                return _abteilungid;
            }
            set
            {
                _abteilungid = value;
                RaisePropertyChanged("AbteilungId");
            }
        }

        string _abteilung;
        public string Abteilung
        {
            get
            {
                return _abteilung;
            }
            set
            {
                _abteilung = value;
                RaisePropertyChanged("Abteilung");
            }
        }

        int _planSchemaId;
        public int PlanSchemaId
        {
            get
            {
                return _planSchemaId;
            }
            set
            {
                _planSchemaId = value;
                RaisePropertyChanged("PlanSchemaId");
            }
        }

		public int? Pensum
		{
			get { return null; }
			set
			{
			}
		}

		#region Stunden Soll/Haben

		public double? Vortrag
		{
			get { return null; }
			set
			{
			}
		}

		public double? Soll
		{
			get { return null; }
			set
			{
			}
		}

		public double? Haben
		{
			get { return null; }
			set
			{
			}
		}

		public double? Anpassung
		{
			get { return null; }
			set
			{
			}
		}

		public double? Differenz
		{
			get { return null; }
		}

		#endregion

		#region Coloring
		
		Color _color;
        public Color RowColor
        {
            get
            {
                return _color;
            }
            set
            {
                _color = value;
				RaisePropertyChanged("RowColor");
            }
        }

		Color _headercolor;
		public Color HeaderColor
		{
			get
			{
				return _headercolor;
			}
			set
			{
				_headercolor = value;
				RaisePropertyChanged("HeaderColor");
			}
		}

		#endregion
	}
}
